<?php 
if ( isset ($_GET['id']) )
	$id=$_GET['id'];
else if ( isset ($_GET['idCs']) )
	$id=$_GET['idCs'];
$db = new DBManager ( 'localhost', 'root', '', 'iumus' );
$query='SELECT * FROM commenti WHERE idFilm=\''.$id.'\' limit 0,5';
$result=$db->executeQuery ($query);
echo "<table><tr><th>Comment</th></tr>";
if ( mysql_num_rows($result) > 0 )
while($row=mysql_fetch_array($result))
	echo "<tr><td>".$row['idUser']." says : ".$row['commento']."</td></tr>";
else echo "<tr><td>for this film were not released comments</td></tr>";
echo "</table>";
?>